package leetcode.editor.vscdev;

import leetcode.editor.utils.TreeNode;
/* 108. 将有序数组转换为二叉搜索树
 * 
 */

class Solution {
    public TreeNode sortedArrayToBST(int[] nums) {
        return null;
    }
    private TreeNode createBSTByArray(int[] nums, int left, int right) {
        if (left >= right) return null;
        int mid = left + (right - left) / 2;
        TreeNode root = new TreeNode(nums[mid]);
        root.left = createBSTByArray(nums, left, mid);
        root.right = createBSTByArray(nums, mid+1, right);
        return root;
    }
}